Skip to content

Add reduced Beholder metric resources#2249

Draft
pkcll wants to merge 4 commits into
mainfrom
beholder-otel-reduced-resource-attributes
Draft

Add reduced Beholder metric resources#2249
pkcll wants to merge 4 commits into
mainfrom
beholder-otel-reduced-resource-attributes

Conversation

@pkcll

@pkcll pkcll commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add opt-in resource filtering for Beholder metric exports while preserving full resources for traces and logs
  • preserve authoritative csa_public_key and caller-provided node_id from [Telemetry.ResourceAttributes] on reduced metric resources
  • emit beholder.otel.resource_attributes.full only when filtering is enabled, retaining full metadata for inspection
  • wire resource filtering flags through LOOP environment configuration

Feature flags

  • CL_TELEMETRY_REDUCED_METRIC_RESOURCE_ATTRIBUTES_ENABLED (default false)
  • CL_TELEMETRY_EXCLUDE_VOLATILE_RESOURCE_ATTRIBUTES_FROM_METRICS_ENABLED (default false)

Test plan

  • go test -race ./pkg/beholder ./pkg/loop
  • go vet ./pkg/beholder ./pkg/loop
  • In staging, enable reduced resources and verify csa_public_key, node_id, service.name, and service.version remain on metrics
  • Enable volatile filtering and verify process.pid, service.instance.id, and k8s.pod.* only remain on beholder_otel_resource_attributes_full

Follow-ups

  • Strip sidecar-injected k8s.pod.* labels in infra-k8s; they are added after the SDK and cannot be removed by this change.

Keep full OTel metadata for logs, traces, and a resource info metric while allowing metric exports to omit high-cardinality resource attributes.
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

✅ API Diff Results - github.com/smartcontractkit/chainlink-common

✅ Compatible Changes (8)

pkg/beholder (1)
  • ResourcePair — ➕ Added
pkg/beholder.(*Client) (1)
  • RecordFullResourceAttributesMetric — ➕ Added
pkg/beholder.Config (2)
  • ExcludeVolatileResourceAttributesFromMetricsEnabled — ➕ Added

  • ReducedMetricResourceAttributesEnabled — ➕ Added

pkg/beholder.writerClientConfig (2)
  • ExcludeVolatileResourceAttributesFromMetricsEnabled — ➕ Added

  • ReducedMetricResourceAttributesEnabled — ➕ Added

pkg/loop.EnvConfig (2)
  • TelemetryExcludeVolatileResourceAttributesFromMetricsEnabled — ➕ Added

  • TelemetryReducedMetricResourceAttributesEnabled — ➕ Added


📄 View full apidiff report

pkcll added 3 commits July 13, 2026 20:10
Preserve effective resource identity while filtering all pod-scoped volatile attributes and avoid emitting the info gauge unless filtering is enabled.
Cover authoritative identity preservation, effective service identity, pod-prefix filtering, and default feature-flag behavior.
Preserve node_id from Telemetry.ResourceAttributes instead of adding a parallel Beholder and LOOP configuration path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant